package cn.sofwin.day0107.homework;

import java.util.Scanner;

public class Triangle {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请依次输入三个边长：");
        int side1 = sc.nextInt();
        int side2 = sc.nextInt();
        int side3 = sc.nextInt();
        boolean result = judge(side1, side2, side3);
        System.out.println("能否构成三角形?" + result);


    }

    static boolean judge(int s1, int s2, int s3) {
        if (((s1 + s2) > s3 )|| ((s1 + s3) > s2 )|| ((s2 + s3) > s1)) {
            return true;
        } else {
            return false;
        }
    }
}
